<html><head><title>CGIParameterValue</title></head>
<body bgcolor="#EFF1F0" link="#3A3966" vlink="#000000" alink="#000000">
<font face="Verdana, sans-serif" size="2"><p align="center"><b><font size="4">CGIParameterValue()</font></b></p>
<p><b>Syntax</b></p><blockquote>
Result = <font color="#3A3966"><b>CGIParameterValue</b></font>(Name$ [, Index])</blockquote>

</blockquote>
<b>Description</b><br><blockquote>

Returns the value of the specified parameter. 

</blockquote><p><b>Parameters</b></p><blockquote>
<style type="text/css">
table.parameters { border-spacing: 0px; border-style: none; border-collapse: collapse; }
table.parameters td { border-width: 1px; padding: 6px; border-style: solid; border-color: gray; vertical-align: top; font-family:Arial; font-size:10pt; }
</style>
<table width="90%" class="parameters">
<tr><td width="10%"><i>Name$</i></td>
<td width="90%"> 
The name of the parameter to get the value. The parameter name is case-sensitive. 
<a href="cgiparametername.html">CGIParameterName()</a> can be used to get the name of a specified parameter. 
To get the number of available parameters, use <a href="countcgiparameters.html">CountCGIParameters()</a>. This 
parameter will be ignored if an 'Index' is specified. 

</td></tr>
<tr><td><i>Index (optional)</i></td>
<td> 
The index of the parameter to get the value. The first index value starts from 0. 
If specified, the 'Name$' parameter value is ignored (excepts if sets to <font color="#924B72">#PB_Ignore</font>). 

</td></tr>
</table>
</blockquote><p><b>Return value</b></p><blockquote>

Returns the value of the specified parameter. 

</blockquote><p><b>Example</b></p><blockquote>

<pre><font face="Courier New, Courier, mono"size="2">  <b><font color="#3A3966">If</font></b> <b><font color="#3A3966">Not</font></b> <font color="#3A3966">InitCGI</font>() <b><font color="#3A3966">Or</font></b> <b><font color="#3A3966">Not</font></b> <font color="#3A3966">ReadCGI</font>()
    <b><font color="#3A3966">End</font></b>
  <b><font color="#3A3966">EndIf</font></b>
  
<font color="#3A3966">  WriteCGIHeader</font>(<font color="#924B72">#PB_CGI_HeaderContentType</font>, &quot;text/html&quot;, <font color="#924B72">#PB_CGI_LastHeader</font>) <font color="#3A3966">; Write the headers to inform the browser of the content format</font>
 
<font color="#3A3966">  WriteCGIString</font>(&quot;&lt;html&gt;&lt;title&gt;PureBasic - parameters&lt;/title&gt;&lt;body&gt;&quot; +
                 &quot;NbParameters: &quot; +<font color="#3A3966"> CountCGIParameters</font>() + &quot;&lt;br&gt;&lt;br&gt;&quot;)
  
  <font color="#3A3966">; List the all parameters and display their name and value</font>
  <font color="#3A3966">;</font>
  <b><font color="#3A3966">For</font></b> k = 0 <b><font color="#3A3966">To</font></b> <font color="#3A3966">CountCGIParameters</font>()-1 
<font color="#3A3966">    WriteCGIString</font>(<font color="#3A3966">CGIParameterName</font>(k) + &quot;: &quot; +<font color="#3A3966"> CGIParameterValue</font>(&quot;&quot;, k) + &quot;&lt;br&gt;&quot;)
  <b><font color="#3A3966">Next</font></b>
  
<font color="#3A3966">  WriteCGIString</font>(&quot;&lt;/body&gt;&lt;/html&gt;&quot;)
</font></pre>

</blockquote><p><b>See Also</b></p><blockquote>

<a href="countcgiparameters.html">CountCGIParameters()</a>, <a href="cgiparametername.html">CGIParameterName()</a>, <a href="cgiparametertype.html">CGIParameterType()</a> 

</Blockquote><p><b>Supported OS </b><Blockquote>All</Blockquote></p><center><- <a href=cgiparametertype.html>CGIParameterType()</a> - <a href="index.html">CGI Index</a> - <a href="cgivariable.html">CGIVariable()</a> -><br><br>

</body></html>